package com.innovations.framework.sms;

import javax.validation.constraints.NotEmpty;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

@Data
@Validated
@ConfigurationProperties(prefix = "sms.custom")
@Component
public class CustomConfig {

    @NotEmpty(message = "短信接口不能为空")
    private String apiUrl;

    @NotEmpty(message = "短信appId不能为空")
    private String appId;

    @NotEmpty(message = "短信appKey不能为空")
    private String appKey;

    @NotEmpty(message = "短信模板不能为空" )
    private String templateCode;
}
